package com.ouyy.volunteerservice.volunteer.domain.po;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Data
@TableName("volunteer_activities") // 指定表名，防止表名识别错误
public class VolunteerActivities {

    @TableId(value = "activity_id", type = IdType.AUTO) // 主键匹配数据库 activate_id
    private Integer activityId; // ✅ 字段名和数据库保持一致，避免映射失败

    private String activityName;
    private Integer organizationId;
    private String serviceCategory;
    private String activityStatus;
    private String activityType;
    private String registrationScope;
    private String initiator;
    private String contactPerson;
    private String address;
    private String details;
    private String registrationInfo;
    private String durationDisplay;
    private String volunteerProtectionInfo;
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    private LocalDateTime startDate;
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    private LocalDateTime endDate;
    private LocalDateTime publishTime = LocalDateTime.now();
    private String activityPictureInfo;
    private Integer recruitmentNumber; // 新增
    private Integer registeredNumber;  // 新增
    private String contactPhone;  // 新增
}
